package cn.wsxiot.display.controller;

import cn.wsxiot.display.domain.User;
import cn.wsxiot.display.exception.MyException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpSession;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;

@Controller
public class TestController {

    @RequestMapping("/test")
    public String myHello(HttpSession httpSession) {
        Map map = new HashMap();
        map.put("t1", "t1con");
        map.put("t2", "t2con");
        httpSession.setAttribute("test", map);
        return "test";
    }
}
